while, Control structures


Prototype:

while (expr) statement

Description:

while loops are the simplest type of loop. They behave just like their C counterparts.

The meaning of a while statement is simple. It tells Concept to execute the nested statement(s) repeatedly, as long as the while expression evaluates to true. The value of the expression is checked each time at the beginning of the loop, so even if this value changes during the execution of the nested statement(s), execution will not stop until the end of the iteration (each time Concept runs the statements in the loop is one iteration). Sometimes, if the while expression evaluates to false from the very beginning, the nested statement(s) won't even be run once.
See also if.

Example
while (i<5) {
	echo i++;
}